<!-- 地图 -->
<template>
  <div class="box">
    <div class="box-header">
      <div @click="fanhui">《返回</div>
      <div>地图</div>
      <div>:</div>
    </div>
    <div class="box-bbody">
      <baidu-map
        id="bm-view"
        ak="FZcAIcAlegKTsIuGxSiGP7zYRblFMO5D"
        center="上海"
      >
        <bm-scale anchor="BMAP_ANCHOR_TOP_RIGHT"></bm-scale>
      </baidu-map>
    </div>
  </div>
</template>

<script>
import BaiduMap from "vue-baidu-map/components/map/Map.vue";
// import Vue from "vue";
// import { Lazyload } from "vant";

// Vue.use(Lazyload);
// import axios from "axios";
export default {
  //import引入的组件需要注入到对象中才能使用
  components: {
    BaiduMap,
  },
  data() {
    //这里存放数据
    return {
      // images: [],
    };
  },
  //监听属性 类似于data概念
  computed: {},
  //监控data中的数据变化
  watch: {},
  //方法集合
  methods: {
    ////
    fanhui() {
      this.$router.push("/Home");
    },
  },
  //生命周期 - 创建完成（可以访问当前this实例）
  created() {},
  //生命周期 - 挂载完成（可以访问DOM元素）
  mounted() {},
};
</script>
<style lang='scss' scoped>
.box {
  width: 100%;
  height: 100%;
  background: orange;
  font-size: 14px;
  display: flex;
  flex-direction: column;
}
.box-header {
  width: 100%;
  height: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0px 20px;
}
.box-bbody {
  width: 100%;
  flex: 1;
  overflow-x: hidden;
  background: #ccc;
  display: flex;
  flex-direction: column;
}
.box-box1 {
  width: 100%;
  height: 4rem;
  background: rgb(236, 60, 36);
}
.box-box1 img {
  width: 100%;
  height: 4rem;
}
.box-box2 {
  width: 100%;
  height: 2rem;
  background: pink;
}

#bm-view {
  width: 100%;
  height: 300px;
}
</style>